//二进制转换为十进制
#include <stdio.h>
#include <string.h>
int translate(char* zu);
int main(void)
{
	int put;
	char* pbin="0111";
	put = translate(pbin);
	printf("%d", put);
	return 0;
}
int translate(char* zu)
{
	int count = strlen(zu);
	printf("%d\n", count);
	int circul;
	int sum=0;
	for (circul = 0; circul < count; circul++)
	{
		sum = (sum ) * 2 + (zu[circul] - 48);
	}
	return sum;
}